import {NgModule, ErrorHandler} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
import {MyApp} from './app.component';
import {HttpClientModule} from '@angular/common/http';


//引入页面
import {OrderPage} from '../pages/order/order';
import {ContactPage} from '../pages/contact/contact';
import {HomePage} from '../pages/home/home';
import {CouponsPage} from '../pages/coupons/coupons';
import {TabsPage} from '../pages/tabs/tabs';
import {LoginPage} from '../pages/login/login';
import {MyInfoPage} from '../pages/my-info/my-info';
import {AllServicePage} from '../pages/all-service/all-service';
import {MorePage} from '../pages/more/more';
import {ServiceCommitmentPage} from '../pages/service-commitment/service-commitment';
import {NewForestPage} from '../pages/new-forest/new-forest';
import {AppointmentCleaningPage} from '../pages/appointment-cleaning/appointment-cleaning';
import {LampblackCleaningPage} from '../pages/lampblack-cleaning/lampblack-cleaning';
import {HerNannyPage} from '../pages/her-nanny/her-nanny';
import {LaundryServicePage} from '../pages/laundry-service/laundry-service';
import {AddressPage} from '../pages/address/address';
import {NewAddressPage} from '../pages/new-address/new-address';
import {OrderConfirmationPage} from '../pages/order-confirmation/order-confirmation';
import {OrderDetailsPage} from '../pages/order-details/order-details';
import {PayPopupPage} from '../pages/pay-popup/pay-popup';


import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';

//服服务提供者
import {MyinfoProvider} from '../providers/myinfo/myinfo';
import {HomeProvider} from '../providers/home/home';
import {LampblackCleaningProvider} from '../providers/lampblack-cleaning/lampblack-cleaning';
import {NewForestProvider} from '../providers/new-forest/new-forest';
import {ServiceCommitmentProvider} from '../providers/service-commitment/service-commitment';



@NgModule({
    declarations: [
        MyApp,
        OrderPage, //订单页
        ContactPage, //个人信页
        HomePage,//首页
        TabsPage,
        CouponsPage,//优惠券页
        LoginPage,
        MyInfoPage,
        AllServicePage,
        MorePage,
        ServiceCommitmentPage,
        NewForestPage,
        AppointmentCleaningPage,
        LampblackCleaningPage,
        HerNannyPage,
        LaundryServicePage,
        AddressPage,
        NewAddressPage,
        OrderConfirmationPage,
        OrderDetailsPage,
        PayPopupPage


    ],
    imports: [
        HttpClientModule,
        BrowserModule,
        //IonicModule.forRoot(MyApp)
        IonicModule.forRoot(MyApp, {
            tabsHideOnSubPages: true, /*yin*/
            backButtonText: ''  /*配置返回按钮*/
        })
    ],
    bootstrap: [IonicApp],
    entryComponents: [
        MyApp,
        OrderPage,
        ContactPage,
        HomePage,
        TabsPage,
        CouponsPage,
        LoginPage,
        MyInfoPage,
        AllServicePage,
        MorePage,
        ServiceCommitmentPage,
        NewForestPage,
        AppointmentCleaningPage,
        LampblackCleaningPage,
        HerNannyPage,
        LaundryServicePage,
        AddressPage,
        NewAddressPage,
        OrderConfirmationPage,
        OrderDetailsPage,
        PayPopupPage

    ],
    providers: [
        StatusBar,
        SplashScreen,
        {provide: ErrorHandler, useClass: IonicErrorHandler},
        MyinfoProvider,
        HomeProvider,
        LampblackCleaningProvider,
        NewForestProvider,
        ServiceCommitmentProvider
    ]
})
export class AppModule {
}
